package com.gzwanchuang.lszg.view.treeopen;

import com.chad.library.adapter.base.entity.node.BaseNode;
import com.chad.library.adapter.base.provider.BaseNodeProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gzwanchuang.lszg.R;


import org.jetbrains.annotations.NotNull;

public class SecondNodeProvider extends BaseNodeProvider {

    @Override
    public int getItemViewType() {
        return 1;
    }

    @Override
    public int getLayoutId() {
        return R.layout.def_section_item;
    }

    @Override
    public void convert(@NotNull BaseViewHolder helper, @NotNull BaseNode data) {
        // 数据类型需要自己强转
        SecondNode entity = (SecondNode) data;
        helper.setText(R.id.tv_content, "· "+entity.getTitle());
        helper.setGone(R.id.line,!entity.isLine());
    }
}
